<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MateComponent Activation .server Files For Applets: Panel Applet Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Panel Applet Library Reference Manual">
<link rel="up" href="applet-writing.html" title="Writing Applets">
<link rel="prev" href="applet-writing.html" title="Writing Applets">
<link rel="next" href="applet-popups.html" title="Defining a Popup Context Menu">
<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="applet-writing.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="applet-writing.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="applet-popups.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="server-files"></a>MateComponent Activation .server Files For Applets</h2></div></div></div>
<p>Since an applet is a matecomponent component, you must write
a .server file so that the matecomponent activation daemon is aware that
your component exists and how to activate it. Copy and paste is
your friend here ...
      </p>
<pre class="programlisting">
&lt;oaf_info&gt;
&lt;oaf_server iid="OAFIID:My_HelloApplet_Factory" type="exe"
            location="test-matecomponent-applet"&gt;

        &lt;oaf_attribute name="repo_ids" type="stringv"&gt;
                &lt;item value="IDL:MateComponent/GenericFactory:1.0"/&gt;
                &lt;item value="IDL:MateComponent/Unknown:1.0"/&gt;
        &lt;/oaf_attribute&gt;
        &lt;oaf_attribute name="name" type="string" value="Hello World Applet Factory"/&gt;
        &lt;oaf_attribute name="description" type="string" value="My first applet factory"/&gt;
&lt;/oaf_server&gt;

&lt;oaf_server iid="OAFIID:My_HelloApplet" type="factory"
            location="OAFIID:My_HelloApplet_Factory"&gt;

        &lt;oaf_attribute name="repo_ids" type="stringv"&gt;
                &lt;item value="IDL:MATE/Vertigo/MatePanelAppletShell:1.0"/&gt;
                &lt;item value="IDL:MateComponent/Control:1.0"/&gt;
                &lt;item value="IDL:MateComponent/Unknown:1.0"/&gt;
        &lt;/oaf_attribute&gt;
        &lt;oaf_attribute name="name" type="string" value="Hello World Applet"/&gt;
        &lt;oaf_attribute name="description" type="string" value="My first applet for the MATE2 panel"/&gt;
        &lt;oaf_attribute name="panel:icon" type="string" value="mate-applets.png"/&gt;
&lt;/oaf_server&gt;
&lt;/oaf_info&gt;
      </pre>
<p>Probably the most important thing to note here is that, unlike
.server files for other matecomponent components, applet .server files contain
a special attribute called 'panel:icon'. This is used by the panel to display
an entry for the applet in the 'Add to Panel' dialog.
      </p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29</div>
</body>
</html>